package com.example.bzh.gamecat.ui.message.innerfriend.service;

import android.os.Bundle;
import android.view.View;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.ImageView;
import android.widget.Toast;

import com.example.bzh.gamecat.R;
import com.example.bzh.gamecat.base.BaseActivity;

import butterknife.BindView;
import butterknife.OnCheckedChanged;
import butterknife.OnClick;

public class ServiceActivity extends BaseActivity {

    @BindView(R.id.iv_service_back)
    ImageView ivServiceBack;
    @BindView(R.id.cb_society_service)
    CheckBox cbSocietyService;
    @BindView(R.id.cb_game_service)
    CheckBox cbGameService;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    public int getLayoutId() {
        return R.layout.activity_service;
    }

    @Override
    public void initView() {
        super.initView();
    }

    @OnClick({R.id.iv_service_back})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.iv_service_back:
                finish();
                break;
        }
    }

    @OnCheckedChanged({R.id.cb_society_service, R.id.cb_game_service})
    public void onCheckedChanged(CompoundButton var1, boolean var2) {
        switch (var1.getId()) {
            case R.id.cb_society_service:
                if (var2) {
                    cbSocietyService.setText("订阅");
                } else {
                    cbSocietyService.setText("取消订阅");
                }
                break;
            case R.id.cb_game_service:
                if (var2) {
                    cbGameService.setText("订阅");
                } else {
                    cbGameService.setText("取消订阅");
                }
                break;
        }
    }
}
